package com.stlm2.dems.entity;

/**
 * Created by apple on 2017/10/12.
 */
public enum BannerType {

    AppRecommend(1) {
        public String toString() {
            return "app推荐";
        }
    },
    WapRecommend(2) {
        public String toString() {
            return "wap推荐";
        }
    },
    AppMobile(3) {
        public String toString() {
            return "app手机";
        }
    },
    WapMobile(4) {
        public String toString() {
            return "wap手机";
        }
    },
    AppComputer(5) {
        public String toString() {
            return "app电脑";
        }
    },
    WapComputer(6) {
        public String toString() {
            return "wap电脑";
        }
    },
    AppDigital(7) {
        public String toString() {
            return "app数码";
        }
    },
    WapDigital(8) {
        public String toString() {
            return "wap数码";
        }
    },
    AppParts(9) {
        public String toString() {
            return "app配件";
        }
    },
    WapParts(10) {
        public String toString() {
            return "wap配件";
        }
    },
    AppHeadline(11) {
        public String toString() {
            return "app头条";
        }
    },
    WapHeadline(12) {
        public String toString() {
            return "wap头条";
        }
    };
    private final int val;

    BannerType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static BannerType getByIntValue(int n) {
        switch (n) {
            case 1:
                return AppRecommend;
            case 2:
                return WapRecommend;
            case 3:
                return AppMobile;
            case 4:
                return WapMobile;
            case 5:
                return AppComputer;
            case 6:
                return WapComputer;
            case 7:
                return AppDigital;
            case 8:
                return WapDigital;
            case 9:
                return AppParts;
            case 10:
                return WapParts;
            case 11:
                return AppHeadline;
            case 12:
                return WapHeadline;
            default:
                return null;
        }
    }
}
